Skip to main content

All Questions

2votes
4answers
293views

A simplified regular expression matcher

I am working my way through some code challenges — partly to improve my problem solving, but also to improve my code quality. I think my current (fully-functional) solution to a challenge is pretty ...
moyoka's user avatar
1vote
1answer
579views

Coin Flip Streaks script

I am attempting to complete the coin flip streaks problem from automate the boring stuff with python. My code works fine but my only concern is the phrasing of the task. Does the question want us to ...
JerryTn's user avatar
13votes
2answers
5kviews

Average spam confidence

Exercise 7.2 from Python for Informatics: Write a program to prompt for a file name, and then read through the file and look for lines of the form: ...
Mast's user avatar
  • 13.7k
4votes
1answer
253views

Regex to find variants of "Google"

From the HackerRank question definition: The word google can be spelled in many different ways. E.g. google, g00gle, g0oGle, g<>0gl3, googl3, GooGIe etc... Because g = G o = O ...
JaDogg's user avatar
  • 4,541
3votes
0answers
1kviews

Given an input string and a pattern, implement wildcard pattern matching

I have been trying to solve "Wildcard Matching" on leetcode. I know there are more "manual" ways to solve this without using the RE library. But I would like to know if passing the time limit is ...
Perplexabot's user avatar
10votes
3answers
3kviews

Imgur URL parser

Fairly new to Python, and I have been doing a few Edabit challenges, to better help with my problem-solving. I have just completed a some what semi-difficult challenge, and I was hoping for some feed ...
tightasbzip's user avatar
4votes
3answers
346views

Remove repetitive strings from a given sentence efficiently

I recently gave a test on HackerRank: Given a string, return the most concise string that can be formed from it. For example: ...
python's user avatar
2votes
1answer
1kviews

TDD: String Calculator Kata

String Calculator Create a simple String calculator with a method int Add(string numbers). The method can take 0, 1 or 2 numbers, and will return ...
Caridorc's user avatar
4votes
2answers
378views

Efficient use of regular expression and string manipulation

The following is my solution to Java vs C++. I think the way I have used the re library is inefficient, and possible erroneous as I am getting tle. ...
user43115's user avatar

close